package hadoop.mr04;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class T_reducer extends Reducer<person, NullWritable, Text,NullWritable> {
    Text t1 = new Text();

    @Override
    protected void reduce(person key, Iterable<NullWritable> values, Reducer<person, NullWritable, Text, NullWritable>.Context context) throws IOException, InterruptedException {
        t1.set(String.valueOf(key));
//        System.out.println(key);
        context.write(t1,NullWritable.get());
    }
}
